package com.javaxiaobear.base.framework.web.domain;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mybatisflex.annotation.Column;
import java.util.HashMap;
import java.util.Map;
import lombok.Data;

@Data
public class SimpleEntity {
  /** 搜索值 */
  @Column(ignore = true)
  @JsonIgnore
  private String searchValue;

  /** 请求参数 */
  @JsonInclude(JsonInclude.Include.NON_EMPTY)
  @Column(ignore = true)
  private Map<String, Object> params;

  /** 排序字段 */
  @Column(ignore = true)
  private String orderByColumn;

  /** 倒序还是顺序 */
  @Column(ignore = true)
  private String isAsc;

  public Map<String, Object> getParams() {
    if (params == null) {
      params = new HashMap<>();
    }
    return params;
  }
}
